#ifndef UZONLINEPROVIDER_H
#define UZONLINEPROVIDER_H

#include "abstractprovider.h"
#include <QSslError>
#include <QNetworkReply>
#include <QDateTime>

class UzonlineProvider : public AbstractProvider
{
    Q_OBJECT
public:
    UzonlineProvider(QObject *parent = 0);
    void setData(const QHash<QString, QString>&);
    void authorize();
    void requestData();
    //int getStatus();
private:
    static const QString authUrl;
    static const QString cabinetUrl;
    //QDateTime lastAuthTime;
    QHash<QString, QString> authDataHash;
    QHash<QString, QString> dataHash;
    AuthResult authResult;
private slots:
    void sslErrorsSlot(const QList<QSslError> &errors);
    void authorizeSlot();
    void requestDataSlot();
};

#endif // UZONLINEPROVIDER_H
